<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>会员列表</title>

    <meta name="keywords" content="">
    <meta name="description" content="">

    <!--[if lt IE 8]>
    <script>
        alert('H+已不支持IE6-8，请使用谷歌、火狐等浏览器\n或360、QQ等国产浏览器的极速模式浏览本页面！');
    </script>
    <![endif]-->

    <link href="/static/admin/public/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
    <link href="/static/admin/public/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
    <link href="/static/admin/public/css/animate.min.css" rel="stylesheet">
    <link href="/static/toastr/toastr.min.css" rel="stylesheet"></link>
    <link href="/static/admin/public/css/style.min.css?v=3.2.0" rel="stylesheet">
    <link href="/static/admin/plugins/jsTree/css/style.min.css" rel="stylesheet">
    <link href="/static/admin/plugins/iCheck/custom.css" rel="stylesheet">
</head>

<body class="fixed-sidebar full-height-layout gray-bg">
<div class="wrapper wrapper-content animated fadeInRight" id="memberDetail">
    <div class="ibox float-e-margins" >
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5 class="pull-left">发布详情</h5>
                <div class="pull-right">
                    <a href="/admin/freight/index" class="btn btn-link">返回</a>
                </div>

            </div>
            <div class="ibox-content">
                <div class="row">
                    <div class="col-lg-5">
                        <dl class="dl-horizontal">
                            <dt>所属分类：</dt>
                            <dd>{{item_category_status[freightData.item_category-1]}}</dd>
                            <dt>标题：</dt>
                            <dd>{{freightData.title}}</dd>

                            <dt>服务类别：</dt>
                            <dd>{{freightData.service_name}}
                            </dd>
                            <dt>货物类别：</dt>
                            <dd>{{freightData.trade_name}}</dd>
                            <dt>公司名称：</dt>
                            <dd>{{freightData.member_name}}</dd>
                        </dl>
                    </div>
                    <div class="col-lg-7" id="cluster_info">
                        <dl class="dl-horizontal">
                            <dt>地区：</dt>
                            <dd>{{freightData.province}}{{freightData.city}}</dd>
                            <dt>截止日期：</dt>
                            <dd>{{freightData.end_time}}</dd>
                            <dt>预算金额：</dt>
                            <dd>
                                {{freightData.budget}}万元/年
                            </dd>
                            <dt>联系人：</dt>
                            <dd>
                                {{freightData.member_contacts}}
                            </dd>
                            <dt>手机号码：</dt>
                            <dd>
                                {{freightData.member_mobile}}
                            </dd>
                        </dl>
                    </div>
                </div>
                <div class="row">
                    <div class="col-lg-12">
                        <dl class="dl-horizontal">
                            <dt>项目概况：</dt>
                            <dd>
                                {{freightData.item_about}}
                            </dd>
                        </dl>
                    </div>
                </div>
                <div class="row">
                    <div class="col-lg-12">
                        <dl class="dl-horizontal">
                            <dt>资格要求：</dt>
                            <dd>
                                <p style="white-space: normal;word-break: break-all;">{{freightData.certification_content}}</p>
                            </dd>
                        </dl>
                    </div>
                </div>
                <div class="row">
                    <div class="col-lg-12">
                        <dl class="dl-horizontal">
                            <dt>项目内容：</dt>
                            <dd>
                               <p style="white-space: normal;word-break: break-all;">{{freightData.item_content}}</p>
                            </dd>
                        </dl>
                    </div>
                </div>
                <div class="row">
                    <div class="col-lg-12">
                        <dl class="dl-horizontal">
                            <dt>附件：</dt>
                            <dd v-for="item in accessory_info">
                                <a  :href="item.fileUrl" class="text-navy">{{item.name}}</a>
                            </dd>
                        </dl>
                    </div>
                </div>
                <div class="row" v-if="freightData.status==3">
                    <div class="col-lg-12">
                        <dl class="dl-horizontal">
                            <dt>未通过原因：</dt>
                            <dd>
                                <p style="white-space: normal;word-break: break-all;">{{freightData.status_message}}</p>
                            </dd>
                        </dl>
                    </div>
                </div>
<!--                <div class="row">-->
<!--                    <div class="col-lg-12">-->
<!--                        <dl class="dl-horizontal">-->
<!--                            <dt>审核：</dt>-->
<!--                            <dd>-->
<!--                                <div class="checkbox i-checks">-->
<!--                                    <div class="checkbox i-checks">-->
<!--                                        <label @click="changeStatus(1)">-->
<!--                                            <input :checked="status==1" type="radio"  value="" name="status"> <i></i> 未审核</label>-->
<!--                                        <label @click="changeStatus(2)">-->
<!--                                            <input :checked="status==9" type="radio"  value="" name="status"> <i></i> 审核通过</label>-->
<!--                                        <label @click="changeStatus(3)">-->
<!--                                            <input :checked="status==3" type="radio"  value="" name="status"> <i></i> 审核不通过</label>-->
<!--                                        <label @click="changeStatus(4)">-->
<!--                                            <input :checked="status==4" type="radio" value="" name="status"> <i></i> 终止</label>-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                            </dd>-->
<!--                        </dl>-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="row" v-if="status==3">-->
<!--                    <div class="col-lg-12">-->
<!--                        <dl class="dl-horizontal">-->
<!--                            <dt>原因：</dt>-->
<!--                            <dd>-->
<!--                                <div class="row">-->
<!--                                    <div class="col-md-12">-->
<!--                                        <textarea type="textarea" cols="1" rows="5" placeholder="填写不通过原因" class="form-control"></textarea>-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                            </dd>-->
<!--                        </dl>-->
<!--                    </div>-->
<!--                </div>-->
                <div class="row">
                    <div class="col-lg-12">
                        <dl class="dl-horizontal">
                            <dt>操作：</dt>
                            <dd>
                                <button v-if="freightData.status==1" type="button" @click="changeStatus(2)" class="btn btn-w-m btn-primary">通过审核</button>
                                <button v-if="freightData.status==1" type="button" @click="changeStatus(3)" class="btn btn-w-m btn-danger">不通过审核</button>
                                <button type="button" @click="changeStatus(4)" class="btn btn-w-m btn-warning">终止</button>
                            </dd>
                        </dl>
                    </div>
                </div>
                <div class="row" v-if="status==3">
                    <div class="col-lg-12">
                        <dl class="dl-horizontal">
                            <dt>原因：</dt>
                            <dd>
                                <div class="row">
                                    <div class="col-md-12">
                                        <textarea v-model="status_message" type="textarea" cols="1" rows="5" placeholder="填写不通过原因" class="form-control"></textarea>
                                    </div>
                                </div>
                            </dd>
                        </dl>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 全局js -->
<script src="/static/admin/public/js/jquery-2.1.1.min.js"></script>
<script src="/static/admin/public/js/bootstrap.min.js?v=3.4.0"></script>
<script src="/static/admin/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/static/admin/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/static/admin/plugins/layer/layer.min.js"></script>
<script type="text/javascript" src="/static/vue/vue.js"></script>

<!-- 自定义js -->
<script type="text/javascript" src="/static/util/axios.min.js"></script>
<script type="text/javascript" src="/static/admin/api/require.js"></script>
<script type="text/javascript" src="/static/admin/api/publicAjax.js"></script>

<script type="text/javascript" src="/static/admin/plugins/iCheck/js/icheck.min.js"></script>
<script>
    $(document).ready(function () {
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
    });
</script>
<!-- 第三方插件 -->
<script src="/static/toastr/toastr.min.js"></script>
<script src="/static/toastr/customToastr.js"></script>
<script src="/static/admin/plugins/jsTree/js/jstree.min.js"></script>
<script>
    var id = "{$id}";
    var vmMemberDetail = new Vue({
        el:"#memberDetail",
        data:{
            "id":id,
            'item_category_status':['招标公告','实时货源'],
            "freightData":{},
            "accessory_info":[],
            'status':1,
            "status_message":''
        },
        methods:{
            changeStatus:function(num){
                var el =this
                el.status = num
                if(num == 3){
                    if(el.status_message == ''){
                        $.customToastr('warning','先填写未通过审核原因')
                        return
                    }
                }
                layer.confirm('确定要更改吗？', {
                    btn: ['确定','取消'] //按钮
                }, function(index){
                    layer.close(index)
                    el.changeStatusPost(num)
                });
            },
            changeStatusPost:function(num){
                var el = this;
                var where = {
                    "id":el.id
                }
                var saveData = {
                    "status":num
                }
                if(num == 3){
                    saveData['status_message'] = el.status_message
                }

                var postData = {
                    "where":where,
                    "saveData":saveData
                }
                AjaxPost(postData,'/admin/freight/changeStatus').then((response)=>{
                    if(response.status==1){
                        el.freightData.status = num
                        el.status = 0
                    }

                })
            },
            getMemberAllInfo:function () {
                let el = this
                let postData = {
                    'id':el.id,
                }
                AjaxPost(postData,'/admin/freight/getItemDetail').then((response)=>{
                    if(response.status==1){
                        var freightData = response.result
                        if(freightData.accessory_info){
                            el.accessory_info = freightData.accessory_info
                        }
                        el.freightData = freightData
                    }
                    console.log(response)

                })
            },
        },
        mounted(){
            this.$nextTick(function () {
                this.getMemberAllInfo()
            })
        }

    })
</script>

</body>

</html>